import Mock from 'mockjs2';
import { builder } from '../util';

// 登录
const login = () => {
  const result = {
    token: Mock.mock('@guid')
  };

  return builder(result, '', 200);
}

// 退出登录
const logout = () => {
  return builder('', '', 200);
}

// 修改密码
const updatePassword = () => {
  return builder('', '', 200);
}

Mock.mock(/\/user\/login/, 'post', login);
Mock.mock(/\/user\/logout/, 'post', logout);
Mock.mock(/\/user\/changePwd/, 'put', updatePassword);
